package xyz.ddlnt.serviceusrclient.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.PostCommentAreaDTO;
import xyz.ddlnt.model.dto.PostCommentDTO;
import xyz.ddlnt.model.vo.MyCommentVO;
import xyz.ddlnt.model.vo.PostCommentVO;
import xyz.ddlnt.model.vo.ReplyCommentVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/27 23:07
 */
//@FeignClient(name = "service-usr", url = "http://yixuewang-service-usr:9015", path = "/post_comment")
//@FeignClient(name = "service-usr", url = "http://localhost:9005", path = "/post_comment")
@FeignClient(value = "service-usr", path = "/post_comment")
public interface PostCommentFeignClient {

    /**
     * 保存帖子评论
     *
     * @param postCommentDTO
     * @return
     */
    @PostMapping("/save")
    Result<Boolean> savePostComment(@RequestBody PostCommentDTO postCommentDTO);

    /**
     * 获取帖子评论
     *
     * @param postCommentAreaDTO
     * @return
     */
    @PostMapping("/getPostComment")
    Result<List<PostCommentVO>> getPostComment(@RequestBody PostCommentAreaDTO postCommentAreaDTO);

    /**
     * 获取用户评论
     *
     * @param id
     * @return
     */
    @GetMapping("/getMyComment")
    Result<List<MyCommentVO>> getMyComment(@RequestParam Long id);

    /**
     * 获取用户回复
     *
     * @param id
     * @return
     */
    @GetMapping("/getReplyComment")
    Result<List<ReplyCommentVO>> getReplyComment(@RequestParam Long id);
}
